Function.prototype.jingebind = function (thisArg,...args) {
  const fn = this
  thisArg = (thisArg !== null || thisArg !== undefined) ? Object(thisArg) : window
  return function (...argArray) {
    thisArg.fn = fn
    const finalArray = [...args,...argArray]
    const result = thisArg.fn(...finalArray)
    delete thisArg.fn
    return result
  }
}

function demo (num1,num2,num3,num4) {
  console.log(this);
  console.log(num1,num2,num3,num4);
  return num1
}

const newDemo = demo.jingebind('aaa',1,2)

const result = newDemo(3,4)

console.log('result',result);